package com.xpec.cipher.tals;

public class TalsConstance {
	//
	public static final int BYTE_SIZE = 1;

	public static final int SHORT_SIZE = 2;

	public static final int UINT32_SIZE = 4;

	/**
	 * 最大数据包长度，为了防止恶意攻击用
	 */
	public static final int MAX_DATA_PACKAGE_SIZE = 1024 * 1024 * 32;

	//
	public static final byte CONTENT_TYPE_CHANGE_CIPHER_SPEC = 0;

	public static final byte CONTENT_TYPE_ALERT = 1;

	public static final byte CONTENT_TYPE_HAND_SHAKE = 2;

	public static final byte CONTENT_TYPE_APP_DATA = 3;

	public static final byte CONTENT_TYPE_NO_HAND_SHAKE = 4;

	/**
	 * 返回FlashReleas版会发的头消息
	 */
	public static final byte CONTENT_TYPE_FLASH_RESPONSE = 4;

	//
	public static final byte HAND_SHAKE_TYPE_CLIENT_HELLO = 0;

	public static final byte HAND_SHAKE_TYPE_SERVER_HELLO = 1;

	public static final byte HAND_SHAKE_TYPE_SERVER_RSA_PUBLIC_KEY = 2;

	public static final byte HAND_SHAKE_TYPE_CLIENT_PRE_MASTER = 3;

	public static final byte NO_HAND_SHAKE_TYPE_CLIENT_HELLO = 4;

	public static final byte NO_HAND_SHAKE_TYPE_SERVER_HELLO = 5;

	public static final byte NO_HAND_SHAKE_TYPE_SERVER_RSA_PUBLIC_KEY = 6;

	public static final byte NO_HAND_SHAKE_TYPE_CLIENT_PRE_MASTER = 7;
	//
	public static final int CLIENT_HELLO_SIZE = 32;

	public static final int CLIENT_ROBOT_HELLO_SIZE = 33;
	
	public static final int CLIENT_ROBOT_IDENTIFY_KEY = 9;

	public static final int SERVER_HELLO_SIZE = 32;

	//
	public static final int RSA_MODULUS_SIZE = 256;

	public static final int RSA_EXP_SIZE = 4;

	public static final byte HMAC_SIZE = 10;

	// 记住，如果要添加新的算法的话，数字+1
	public static final byte HMAC_ALGORITHM_NULL = 0;

	public static final byte HMAC_ALGORITHM_HMAC_MD5 = 1;

	public static final byte HMAC_ALGORITHM_HMAC_SHA_1 = 2;

	// 这个算法不用
	public static final byte HMAC_ALGORITHM_POLY1035_AES_MAX = 3;

	// 记住，如果要添加新的算法的话，数字+1
	public static final byte DATA_ENCRYPT_ALGORITHM_NULL = 0;

	public static final byte DATA_ENCRYPT_ALGORITHM_777 = 1;

	public static final byte DATA_ENCRYPT_ALGORITHM_ARC4 = 2;

	public static final byte DATA_ENCRYPT_ALGORITHM_DES = 3;

	//
	public static final byte CHANGE_CIPHER_VERIFY_DATA_SIZE = 16;
	
	/// Client 用
	/// 秘密前体的隨機bytes長度
	public static final int PRE_SECRET_RANDOM_BYTES_SIZE = 46;
//	public static final int MAC_KEY_SIZE = 16;
//	public static final int SYMMETRIC_KEY_SIZE = 16;
}
